package com.candoit.webapps.pricing.bean.adapters;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;

import com.candoit.webapps.pricing.model.ArmadoManoDeObra;
import com.candoit.webapps.pricing.util.QueryUtil;

public class ArmadoConverter extends GenericConverter {

	@Override
	public String getAsString(FacesContext context, UIComponent component,
			Object value) {
		return ((ArmadoManoDeObra)value).toString();
	}
	
	@Override
	public Object getAsObject(FacesContext context, UIComponent component,
			String value) {
		return QueryUtil.getInstance().getArmadoByDescripcion(value);
	}

}
